<?php
class Helper_Validation{
public $_mess;
public $_report;
public function check_empty($text,$loi){
	if($text == NULL){
		$this->_mess[]=$loi;
	}
}

public function check_matches($text1,$text2,$loi){
	if($text1 != $text2){
		$this->_mess[]=$loi;
	}
}

public function valid(){
	if($this->_mess != ""){
		$this->_report = FALSE;
	}else{
		$this->_report=TRUE;
	}
	return $this->_report;
}

}